using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Threading.Tasks;
using UnityEngine.SceneManagement;

public class LauncherRoot : MonoBehaviour
{
    // Start is called before the first frame update
    async void Start()
    {
        var param = new LauncherBooster.Param();
        param.scene_loadHotScene = LoadHotRootScene;
        await LauncherBooster.Stuff.BoostAsync(param);
    }

    Task LoadHotRootScene()
    {
        var tcs = new TaskCompletionSource<bool>();
        var op = SceneManager.LoadSceneAsync("HotRoot", LoadSceneMode.Additive);
        op.completed += (a) =>
        {
            a.allowSceneActivation = true;
            tcs.SetResult(true);
        };
        return tcs.Task;
    }

}
